                                             
/*
 * PurchaseOrder.java
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.samlam;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author Brian Barrett
 */
public class PurchaseOrder {
    
    private List<OrderLine> orderlines = new LinkedList();
    private boolean dirty = false;
    private boolean alreadyInDB = false;
    private String poguid;
    private Vendor vendor;
    
    /** Creates a new instance of PurchaseOrder */
    public PurchaseOrder(String id) {
        this.poguid = id;
    }

    public List<OrderLine> getOrderlines() {
        return orderlines;
    }

    public void setOrderlines(List<OrderLine> orderlines) {
        this.orderlines = orderlines;
        this.dirty = true;
    }

    public boolean isDirty() {
        return dirty;
    }

    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    public void setAlreadyInDB(boolean alreadyInDB) {
        this.alreadyInDB = alreadyInDB;
    }

    public String getPoguid() {
        return poguid;
    }

    public Vendor getVendor() {
        return vendor;
    }

    public void setVendor(Vendor vendor) {
        this.vendor = vendor;
    }
    
}